Name | Type | Length | IsNullable | Collation |
City | nvarchar | 30 | SQL_Latin1_General_CP1_CI_AS | |
City | sysname | 30 | SQL_Latin1_General_CP1_CI_AS | |
CompanyName | nvarchar | 80 | SQL_Latin1_General_CP1_CI_AS | |
CompanyName | sysname | 80 | SQL_Latin1_General_CP1_CI_AS | |
ContactName | nvarchar | 60 | SQL_Latin1_General_CP1_CI_AS | |
ContactName | sysname | 60 | SQL_Latin1_General_CP1_CI_AS | |
Relationship | varchar | 9 | SQL_Latin1_General_CP1_CI_AS |
create view "Customer and Suppliers by City" AS
SELECT City, CompanyName, ContactName, 'Customers' AS Relationship
FROM Customers
UNION SELECT City, CompanyName, ContactName, 'Suppliers'
FROM Suppliers
--ORDER BY City, CompanyName